﻿#pragma once

#include <QObject>
#include <QDateTime>
#include <QString>
//#include "OrderFormData.h"
#include <deque>
#include "Trader.h"
#include "FrameData.h"
#include "VirtualTradeLib.h"
#include "MetricsDataGather.h"

// 此类掌控所有的回测
class BackTestOperator : public Trader
{
public:
	BackTestOperator(MetricsDataGather *pGather);
	~BackTestOperator();

	// 批量回测某一个周期
	void BackTest(time_t circleEndDt, time_t orderEndDt);
	// 回测某一个合约的周期
	void BackTest(const std::string &pSymbolName, time_t circleEndDt, time_t orderEndDt);

	virtual void InsertCTPOrder(const TD::OrderOption &pOption, TD::OrderBackFunc pFunc) override;

private:

	VirtualTradeLib m_tradeModel;
};
